package org.ytor.core.sysapi.dict.model;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ytor.common.util.bean.Beans;
import org.ytor.core.sqlflow.PersistenceModel;
import org.ytor.core.sysapi.dict.resp.SysDictResp;

/**
 * created by yangtong on 2025/4/8 16:36:26
 * <br/>
 * 字典
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class SysDict extends PersistenceModel<SysDict, String> {

    /**
     * 字典名称
     */
    private String dictName;

    /**
     * 字典编码，唯一
     */
    private String dictCode;

    /**
     * 字典项值
     */
    private String dictItemValue;

    /**
     * 字典项值对应的显示文本
     */
    private String dictItemText;

    /**
     * 字典排序
     */
    private Integer sortOrder;

    /**
     * 0-字典/1-字典项
     */
    private Integer type;

    @Override
    public SysDictResp toResp() {
        return Beans.copyProperties(this, SysDictResp.class);
    }
}
